<%@page import="board.BoardVo"%>
<%@page import="board.Board"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>modify.jsp</title>
<script>
function fileDel(fileDelFlag, s){
	location.href= 'index2.jsp?inc_content=./board/modify.jsp&fileDelFlag='+fileDelFlag+'&serial='+s;
}
function btSave(s){
	location.href='index2.jsp?inc_content=./board/modify_result.jsp&serial='+s;
	
}
</script>
</head>
<body>
<h1>✦게시글 수정</h1>
<jsp:useBean id="boardVo" class="board.BoardVo"/>
<jsp:setProperty property="*" name="boardVo"/>
<%
String part=(String)session.getAttribute("part");

Board board = new Board();
board.setVo(boardVo);
BoardVo vo= board.view();
%>

<form id='modify_frm' action='index2.jsp?inc_content=./board/modify_result.jsp' method='post' enctype='multipart/form-data'>
<div id='tot'>
<div id='butGroup'>

<input type='button' onclick='btList()' value='목록'>
<input type='submit' id='btSave' name='btSave' onclick='btSave(<%=vo.getSerial() %>)' value='저장'>

</div>

<p/>
<p/>
<div>
≫ 작 성 자  <input name='mid' type="search" size='15' value='<%=vo.getMid() %>'> 
| 암 호 <input name='pwd' type='password' maxlength="10" size='15' value='<%=vo.getPwd() %>'><br/>
≫  제&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;목 <input type="search" size='39' name='subject' value='<%=vo.getSubject() %>'></div>
<textarea rows="7" cols="48"  name='content'><%=vo.getContent() %></textarea>

<div>≫  파일명 : 
<% if(vo.getFilename()==null || boardVo.getFileDelFlag().equals("del")){ %>
<input type="file" name='newfilename'>
<%}else{ %>
<%=vo.getFilename() %>
<input type='button' value='삭제' onclick="fileDel('del',<%=vo.getSerial()%>)"></div>
<%} %>



<input type='hidden' name='filename' value='<%=vo.getFilename() %>'>
<input type='hidden' name='serial' value='<%=vo.getSerial() %>'>
<input type='hidden' name='fileDelFlag' value='<%=boardVo.getFileDelFlag() %>'>

</div>
</form>
</body>
</html>